﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CDStore3Tiers;

namespace CuaHangDiaNhac
{
	public partial class frmInDatHang : Form
	{
		StoreCDDataContext db;
		public int type;
		public frmInDatHang(int maso)
		{
			InitializeComponent();
			db = new StoreCDDataContext();
			db.Connection.ConnectionString = getConfig.getConnection();
			this.Text += maso.ToString();
		}

		private void frmInDatHang_Load(object sender, EventArgs e)
		{
			db = new StoreCDDataContext();
			db.Connection.ConnectionString = getConfig.getConnection();
			int maso = Convert.ToInt32(this.Text.Substring(22));

			DatHangBindingSource.DataSource = db.DatHang_SearchID(maso);
			vw_CTDHNewBindingSource.DataSource = db.vw_CTDH_SelectAll(maso);
			//vw_INBieuMauDonDatHangBindingSource.DataSource = db.vw_INBieuMauDonDatHang_SelectByID(maso);
			this.reportViewer1.RefreshReport();

		}
	}
}
